home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2651 < prev    next >
Encoding:
Text File  |  1996-08-06  |  844 b   |  28 lines

  1. Path: news.drexel.edu!dunx1!st918h5w
  2. From: st918h5w@dunx1.ocs.drexel.edu (Jonathan Juniman)
  3. Newsgroups: comp.lang.c++
  4. Subject: overloaded operator question
  5. Date: 18 Jan 1996 22:48:01 GMT
  6. Organization: Drexel University
  7. Message-ID: <4dmin1$160@noc2.drexel.edu>
  8. NNTP-Posting-Host: dunx1.ocs.drexel.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. What is wrong with the following declaration:
  12.  
  13. MATRIX.H
  14. class Matrix
  15.     {
  16.     public:
  17.     // several other functions here...
  18.     Matrix Matrix::operator *(Matrix&, Matrix&);
  19.     }
  20.   
  21. My compiler (Microsoft Visual C++ v1.5) complains that there are too
  22. many arguments.  How can there be too many arguments?  * is a binary
  23. operator!  My intention is to perform matrix multiplication by 
  24. typing a = b * c, where a, b and c are objects of type Matrix.
  25.  
  26. Any help would be appreciated.  Please reply by e-mail.  Thanks, -Jon.
  27.  
  28.